<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" isELIgnored="false" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE html>
<html>
<head>
    <jsp:include page="/WEB-INF/jsp/include/head.jsp"/>
</head>


<body>
<ol class="breadcrumb">
    <li><strong>当前位置： </strong>评价管理</li>
    <li class="active">年度统计</li>
</ol>


<div class="panel panel-info">
    <div class="panel-heading">
        <h3 style="display: inline-block" class="panel-title">查询</h3>
        <a role="button"  style="float: right" class="btn btn-default btn-xs btn-success"
           onclick="downLoadExcel(this);"><span class="glyphicon glyphicon-export"></span> 导 出</a>
    </div>
    <div class="panel-body">
        <form id="form_search" class="form-horizontal row" >

            <div class="form-group col-sm-5">
                <label class="control-label col-sm-4 ">事项名称：</label>
                <div class="col-sm-8">
                    <select id="type" class="form-control " name="itemId">
                        <c:forEach items="${itemTypeList}" var="i">
                            <option <c:if test="${data.itemId==i.id}">selected</c:if> value="${i.id}">${i.name}
                            </option>
                        </c:forEach>
                    </select>
                </div>
            </div>

            <div class="form-group col-sm-5">
                <label class="col-sm-4  control-label  ">专家姓名：</label>
                <div class="col-sm-8">
                    <input name="expertName"  class="form-control " type="text">
                </div>
            </div>


            <div class="form-group col-sm-5">
                <label class="col-sm-4  control-label  ">日　　期：</label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <div class="input-group date form_date timeInput">
                       <span class="input-group-addon">
                          <span class="glyphicon glyphicon-calendar"></span>
                       </span>
                            <input class="form-control " type="text" name="startTime">
                        </div>
                        <span class="input-group-addon"
                              style="width: auto;padding-right: 3px;padding-left: 3px;border-width: 0px;background-color: transparent">
                          <span>~</span>
                       </span>
                        <div class="input-group date form_date timeInput">
                       <span class="input-group-addon">
                          <span class="glyphicon glyphicon-calendar"></span>
                       </span>
                            <input class="form-control " type="text" name="endTime">
                        </div>
                    </div>
                </div>
            </div>

            <div class="form-group col-sm-5">
                <label class="col-sm-4  control-label  ">所属单位：</label>
                <div class="col-sm-8">
                    <input name="affiliate"  class="form-control " type="text">
                </div>
            </div>
            <div class="form-group col-sm-2">
                <div class="col-sm-8  col-sm-offset-4">
                    <button id="btn_search" type="button" class="btn btn-default "><span
                            class="glyphicon glyphicon-search"></span>&nbsp;查&nbsp;询&nbsp;</button>
                </div>
            </div>

        </form>
    </div>
</div>


<table id="table_data"></table>

<div class="modal fade" id="modal_ajax">
    <div class="modal-dialog  ">
        <div class="modal-content ">
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

<jsp:include page="/WEB-INF/jsp/include/footer.jsp"/>

<script>

    function downLoadExcel(is){
        $(is).attr("href",'business/annualAssess/downLoadExcel?'+$('#form_search').serialize()) ;
    }

    var $table_data = $('#table_data');

    $table_data.bootstrapTable({
        url: 'business/annualAssess/select',
        striped: true,
        cache: false,
        sidePagination: 'server',
        searchOnEnterKey: false,
        pageSize: 10,
        pageList: [ 10, 20,30,50,100,300,500,1000],
        pageNumber: 1,
        pagination: true,
        queryParams: function (params) {
            $.extend(params, $("#form_search").serializeObject());
            return params
        },
        columns: [
            {

                formatter: function (value, row, index) {
                    return [index + 1].join('');
                }
            },
            {
                valign: 'middle',
                field: 'name',
                title: '姓名'

            },
            {
                valign: 'middle',
                field: 'idCard',
                title: '身份证号'
            },
            {
                valign: 'middle',
                field: 'certificateNum',
                title: '证书编号'
            },
            {
                width: 120,
                valign: 'middle',
                field: 'affiliate',
                title: '所属单位'
            },
            {
                field: 'leaderCount',
                title: '担任组<br>长次数'

            }, {
                field: 'crewCount',
                title: '担任组<br>员次数'
            },
            {
                field: 'goodCount',
                title: '现场审查工作<br>评价（ 好 ）'
            },
            {
                field: 'middleCount',
                title: '现场审查工作<br>评价（一般）'
            },
            {
                field: 'badCount',
                title: '现场审查工作<br>评价（ 差 ）'
            },
            {
                field: 'reportCount',
                title: '观察报告存<br>在问题次数'
            },
            {
                field: 'disciplineCount',
                title: '纪律反馈存<br>在问题次数'
            },
            {
                field: 'overtimeCount',
                title: '上报材料<br>超期次数'
            },

            {
                field: 'trainCount',
                title: '无故缺<br>勤次数'
            },
            {
                field:'illegalCount',
                title: '投诉检<br>举情况'
            },
            {
                field:'totalScore',
                title: '年度评<br>定分数'

            },
            {
                field:'result',
                title: '年度评<br>定结果'

            },
            {
                title: '升降级',
                valign: 'middle',
                events: 'operateEvents',
                formatter: function (value, row, index) {
                    return [
                        '<button id="button" class="btn btn-default btn-xs   update_data">',
                        '<span class="glyphicon glyphicon-resize-vertical" aria-hidden="true"></span>',
                        ' 升降级',
                        '</button>'
                    ].join('');
                }
            }
        ]


    });

    window.operateEvents = {
        'click .update_data': function (e, value, row, index) {
            $('#modal_ajax').modal({
                backdrop: 'static',
                keyboard: false,
                show: true,
                remote: 'business/annualAssess/editDlg?expertName='+row.name+'&certificateId='+row.certificateId
            });
        }
    };

    $("#btn_search").click(function () {
        $table_data.bootstrapTable('refresh');
    });
    $.sysPlugin.clearModalRemoveData('modal_ajax');
    $.sysPlugin.initSimpleSelect2();
    $.sysPlugin.initDateTimeInput();
</script>



<%--+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--%>

</body>
</html>
